.thaw-input {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    position: relative;
    box-sizing: border-box;
    min-height: 32px;
    gap: var(--spacingHorizontalXXS);
    vertical-align: middle;

    background-color: var(--colorNeutralBackground1);

    font-family: var(--fontFamilyBase);
    font-size: var(--fontSizeBase300);
    font-weight: var(--fontWeightRegular);
    line-height: var(--lineHeightBase300);

    border: 1px solid var(--colorNeutralStroke1);
    border-bottom-color: var(--colorNeutralStrokeAccessible);
    border-radius: var(--borderRadiusMedium);
}

.thaw-input--small {
    min-height: 24px;
    font-size: var(--fontSizeBase200);
    line-height: var(--lineHeightBase200);
}

.thaw-input--large {
    min-height: 40px;
    font-size: var(--fontSizeBase400);
    line-height: var(--lineHeightBase400);
    gap: var(--spacingHorizontalSNudge);
}

.thaw-input:hover {
    border-color: var(--colorNeutralStroke1Hover);
    border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
}

.thaw-input:focus-within {
    outline: transparent solid 2px;
}

.thaw-input:active,
.thaw-input:focus-within {
    border-color: var(--colorNeutralStroke1Pressed);
    border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
}

.thaw-input::after {
    box-sizing: border-box;
    content: "";
    position: absolute;
    left: -1px;
    bottom: -1px;
    right: -1px;
    height: max(2px, var(--borderRadiusMedium));
    border-bottom-left-radius: var(--borderRadiusMedium);
    border-bottom-right-radius: var(--borderRadiusMedium);
    border-bottom: 2px solid var(--colorCompoundBrandStroke);
    clip-path: inset(calc(100% - 2px) 0px 0px);
    transform: scaleX(0);
    transition-property: transform;
    transition-duration: var(--durationUltraFast);
    transition-delay: var(--curveAccelerateMid);
}

.thaw-input:focus-within::after {
    transform: scaleX(1);
    transition-property: transform;
    transition-duration: var(--durationNormal);
    transition-delay: var(--curveDecelerateMid);
}

.thaw-input:focus-within:active::after {
    border-bottom-color: var(--colorCompoundBrandStrokePressed);
}

.thaw-input__input {
    align-self: stretch;
    box-sizing: border-box;
    flex-grow: 1;
    min-width: 0px;
    border-style: none;
    padding: 0 var(--spacingHorizontalM);
    color: var(--colorNeutralForeground1);
    background-color: transparent;
    outline-style: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.thaw-input--small .thaw-input__input {
    padding: 0 var(--spacingHorizontalS);
}

.thaw-input--large .thaw-input__input {
    padding: 0 calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));
}

.thaw-input__input::placeholder {
    color: var(--colorNeutralForeground4);
    opacity: 1;
}

.thaw-input--prefix {
    padding-left: var(--spacingHorizontalMNudge);
}

.thaw-input--small.thaw-input--prefix {
    padding-left: var(--spacingHorizontalSNudge);
}

.thaw-input--large.thaw-input--prefix {
    padding-left: var(--spacingHorizontalM);
}

.thaw-input--prefix > .thaw-input__input {
    padding-left: var(--spacingHorizontalXXS);
}

.thaw-input--large.thaw-input--prefix > .thaw-input__input {
    padding-left: var(--spacingHorizontalSNudge);
}

.thaw-input--suffix {
    padding-right: var(--spacingHorizontalMNudge);
}

.thaw-input--small.thaw-input--suffix {
    padding-right: var(--spacingHorizontalSNudge);
}

.thaw-input--large.thaw-input--suffix {
    padding-right: var(--spacingHorizontalM);
}

.thaw-input--suffix > .thaw-input__input {
    padding-right: var(--spacingHorizontalXXS);
}

.thaw-input--large.thaw-input--suffix > .thaw-input__input {
    padding-right: var(--spacingHorizontalSNudge);
}

.thaw-input__prefix,
.thaw-input__suffix {
    box-sizing: border-box;
    color: var(--colorNeutralForeground3);
    display: flex;
}

.thaw-input.thaw-input--disabled {
    border-color: var(--colorNeutralStrokeDisabled);
    border-bottom-color: var(--colorNeutralStrokeDisabled);
    background-color: var(--colorTransparentBackground);
    cursor: not-allowed;
}

.thaw-input--disabled > .thaw-input__input {
    background-color: var(--colorTransparentBackground);
    color: var(--colorNeutralForegroundDisabled);
    cursor: not-allowed;
}

.thaw-input--disabled > .thaw-input__prefix,
.thaw-input--disabled > .thaw-input__suffix,
.thaw-input--disabled > .thaw-input__input::placeholder {
    color: var(--colorNeutralForegroundDisabled);
}
